import Login from '../component/Login'
import Main from '../component/Main'
import NotFind from '../component/404'
import { Navigate} from 'react-router-dom'
import About from '../component/Main/About'
import Home from '../component/Main/Home'
import News from '../component/Main/Home/News'
import Music from '../component/Main/Home/Music'
import Weather from '../component/Main/About/Weather'
export  const routes = [
    {
        path:'/login',
         element:<Login />
    },
    {
        path:'/main',
         element:<Main />,
         children:[
            {
                path:'/main/home',
                element:<Home/>,
                children:[
                    {
                        path:'/main/home/news',
                        element:<News />,
                    },
                    {
                        path:'/main/home/music',
                        element:<Music />,
                    },
                ]
            },
            {
                path:'/main/about',
                element:<About />,
                children:[
                    {
                        path:'/main/about/weather',
                        element:<Weather />
                    }
                ]
            },
         ]
    },
    {
        path:'/',
         element:<Navigate to='/login'/>
    },
    {
        path:'*',
         element:<NotFind />
    },
]
